<template>
  <div align="center">
      <button @click="getData">刷新</button>&nbsp;
      <label>动态值: </label>{{ backendData }}
  </div>
</template>

<script>
import { getDemoData } from "../api/index";
export default {
  data: function() {
    return {
        backendData: 0
    };
  },
  methods: {
      getData() {
          getDemoData('').then((res) => {
              this.backendData = res.data;
          })
      }
  }
};
</script>

